package helper;

import java.io.Serializable;
import java.util.Date;

import bean.PatientEnvironmentalExposure;
import bean.PatientGeneralInfo;
import bean.PatientPastHistory;
import bean.PatientPersonalInfo;
import bean.labTests.BloodPressure;
import bean.labTests.GlucoseTest;

public class PatientResult implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -1421204836960268172L;

	private long id;
	
	private String firstName;
	private String middleName;
	private String lastName;
	private String sex;
	private String ethnicity;
	private String birthCountry;
	
	private String ssn;
	
	private String addressLine1;
	private String addressLine2;
	private String city;
	private String state;
	private long zip;
	private Date dateOfBirth;
	
	private String homePhone;
	private String workPhone;
	private String email;
	
	private String username;
	private String password;
	private Date lastUpdated;
	public long countPersonalInfo = 0;
	public long countPastHistory = 0;
	public long countEnvironmentalExposure = 0;
	
	
	private PatientPersonalInfo personalInfo = null;
	
	private PatientPastHistory pastHistory = null;
	
	private PatientEnvironmentalExposure environmentalExposure = null;
	
	private BloodPressure[] bloodPressureReadings;
	
	private GlucoseTest[] glucoseTests;
	
	public PatientResult(){
		
	}
	
	public long getCountPastHistory() {
		return countPastHistory;
	}

	public void setCountPastHistory(long countPastHistory) {
		this.countPastHistory = countPastHistory;
	}

	public long getCountEnvironmentalExposure() {
		return countEnvironmentalExposure;
	}

	public void setCountEnvironmentalExposure(long countEnvironmentalExposure) {
		this.countEnvironmentalExposure = countEnvironmentalExposure;
	}

	public PatientResult(PatientGeneralInfo pg) {
		
		this.id = pg.getId();
		this.firstName = pg.getFirstName();
		this.middleName = pg.getMiddleName();
		this.lastName = pg.getLastName();
		this.sex = pg.getSex();
		this.ethnicity = pg.getEthnicity();
		this.birthCountry = pg.getBirthCountry();
		this.ssn = pg.getSsn();
		this.addressLine1 = pg.getAddressLine1();
		this.addressLine2 = pg.getAddressLine2();
		this.city = pg.getCity();
		this.state = pg.getState();
		this.zip = pg.getZip();
		this.dateOfBirth = pg.getDateOfBirth();
		this.homePhone = pg.getHomePhone();
		this.workPhone = pg.getWorkPhone();
		this.email = pg.getEmail();
		this.username = pg.getUsername();
		this.password = pg.getPassword();
		this.lastUpdated = pg.getLastUpdated();
		this.personalInfo = pg.getPersonalInfo();
		this.pastHistory = pg.getPastHistory();
		this.environmentalExposure = pg.getEnvironmentalExposure();
		
		if(pg.getBloodPressureReadings()!=null && pg.getBloodPressureReadings().size() !=0){
			bloodPressureReadings = new BloodPressure[pg.getBloodPressureReadings().size()];
			pg.getBloodPressureReadings().toArray(bloodPressureReadings);
		}
		
		if(pg.getGlucoseTests()!=null && pg.getGlucoseTests().size()!=0){
			glucoseTests = new GlucoseTest[pg.getGlucoseTests().size()];
			pg.getGlucoseTests().toArray(glucoseTests);
		}
			
	}

	public GlucoseTest[] getGlucoseTests() {
		return glucoseTests;
	}

	public void setGlucoseTests(GlucoseTest[] glucoseTests) {
		this.glucoseTests = glucoseTests;
	}

	public PatientResult(long id, String firstName, String middleName,
			String lastName, long countPersonalInfo,long countPastHistory,long countEnvironmentalExposure, Date lastUpdated) {
		super();
		this.id = id;
		this.firstName = firstName;
		this.middleName = middleName;
		this.lastName = lastName;
		this.countPersonalInfo = countPersonalInfo;
		this.countPastHistory = countPastHistory;
		this.countEnvironmentalExposure = countEnvironmentalExposure;
		this.lastUpdated = lastUpdated;
	}
	
	
	
	public BloodPressure[] getBloodPressureReadings() {
		return bloodPressureReadings;
	}
	public void setBloodPressureReadings(BloodPressure[] bloodPressureReadings) {
		this.bloodPressureReadings = bloodPressureReadings;
	}
	
	public PatientPersonalInfo getPersonalInfo() {
		return personalInfo;
	}
	public void setPersonalInfo(PatientPersonalInfo personalInfo) {
		this.personalInfo = personalInfo;
	}
	
	public String getSex() {
		return sex;
	}
	public void setSex(String sex) {
		this.sex = sex;
	}
	public String getEthnicity() {
		return ethnicity;
	}
	public void setEthnicity(String ethnicity) {
		this.ethnicity = ethnicity;
	}
	public String getBirthCountry() {
		return birthCountry;
	}
	public void setBirthCountry(String birthCountry) {
		this.birthCountry = birthCountry;
	}
	public String getSsn() {
		return ssn;
	}
	public void setSsn(String ssn) {
		this.ssn = ssn;
	}
	public String getAddressLine1() {
		return addressLine1;
	}
	public void setAddressLine1(String addressLine1) {
		this.addressLine1 = addressLine1;
	}
	public String getAddressLine2() {
		return addressLine2;
	}
	public void setAddressLine2(String addressLine2) {
		this.addressLine2 = addressLine2;
	}
	public String getCity() {
		return city;
	}
	public void setCity(String city) {
		this.city = city;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	public long getZip() {
		return zip;
	}
	public void setZip(long zip) {
		this.zip = zip;
	}
	public Date getDateOfBirth() {
		return dateOfBirth;
	}
	public void setDateOfBirth(Date dateOfBirth) {
		this.dateOfBirth = dateOfBirth;
	}
	public String getHomePhone() {
		return homePhone;
	}
	public void setHomePhone(String homePhone) {
		this.homePhone = homePhone;
	}
	public String getWorkPhone() {
		return workPhone;
	}
	public void setWorkPhone(String workPhone) {
		this.workPhone = workPhone;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public Date getLastUpdated() {
		return lastUpdated;
	}
	public void setLastUpdated(Date lastUpdated) {
		this.lastUpdated = lastUpdated;
	}
		
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	public String getFirstName() {
		return firstName;
	}
	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}
	public String getMiddleName() {
		return middleName;
	}
	public void setMiddleName(String middleName) {
		this.middleName = middleName;
	}
	public String getLastName() {
		return lastName;
	}
	public void setLastName(String lastName) {
		this.lastName = lastName;
	}
	public long getCountPersonalInfo() {
		return countPersonalInfo;
	}
	public void setCountPersonalInfo(long countPersonalInfo) {
		this.countPersonalInfo = countPersonalInfo;
	}
	
	public PatientPastHistory getPastHistory() {
		return pastHistory;
	}

	public void setPastHistory(PatientPastHistory pastHistory) {
		this.pastHistory = pastHistory;
	}

	public PatientEnvironmentalExposure getEnvironmentalExposure() {
		return environmentalExposure;
	}

	public void setEnvironmentalExposure(
			PatientEnvironmentalExposure environmentalExposure) {
		this.environmentalExposure = environmentalExposure;
	}
	
	

}
